<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>

    <style>
        div {
            width: 100px;
            height: 100px;
        }

        .div1 {
            background-color: red;
        }

        .div2 {
            background-color: green;
        }

        /* 块，行内块，行内 */
        p {
            display: block;
        }
    </style>
</head>
<body>
    <div class="div1">div1</div>
    <div class="div2">div2</div>
    <p>p标签</p>
</body>
</html>